package com.akuhome.resource.exception;

import com.akuhome.resource.enums.ResultEnum;

public class ResourceException extends RuntimeException{

    private int code;

    public ResourceException(ResultEnum resultEnum){
        super(resultEnum.getMessage());
        this.setCode(resultEnum.getCode());
    }

    public ResourceException(ResultEnum resultEnum,String msg){
        super(msg);
        this.setCode(resultEnum.getCode());
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

}
